/*
 * wsLoginSoap.fx
 *
 * Created on 4-mag-2011, 14.57.27
 */

package jfx_mobile_test_01;

/**
 * @author Mitch
 */
import java.lang.*;
import javax.xml.ws.*;

import it.eonegroup.domain.nandi.*;


public class wsLoginSoap {

    //Variabili
    public var iUserid: String;
    public var iPassword: String;
    public var iProgname: String;
    public var iReceiverId: String;
    public var iSenderId: String;
    public var eErrorCode: String;
    public var eErrorDescription: String;
    public var eExtUser: String;
    public var eSuccess: String;
    public var iBadgnr: String;
    public var iEnableDebug: String;
    public var iLanguage: String;
    public var iModuleArea: String;

    //Classe utente
    public var myuser = new User;

    //Istanziazione WS
    public var wservice     = new it.eonegroup.domain.nandi.ZSNWMRFLOGIN();
    public var port        = wservice.getZBNWMRFLOGIN();


    public function callWsLogin(inUser: String, inPass: String) {

        println("ESECUZIONE WEBSERVICES con utente = {inUser} e password = {inPass} " );

        port.ze1WlExecRfLogin(iBadgnr, iEnableDebug, iLanguage, iModuleArea, iPassword, iProgname, iReceiverId, iSenderId, iUserid, eErrorCode, eErrorDescription, eExtUser, eSuccess);

        println("SUCCESS = {eSuccess}");
        println("Descrizione = {eErrorDescription}");

        if (eSuccess == "Y") {
            myuser.status = true;
        } else {
            myuser.status = false;
        }
        
        return;

    } //callWsLogin


} //class wsLoginSoap
